home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Mail / EnhanceMail.1.3 / Source / Info.m < prev    next >
Encoding:
Text File  |  1995-11-05  |  1.5 KB  |  64 lines

  1. /* -*-C-*-
  2. *******************************************************************************
  3. *
  4. * File:         Info.m
  5. * RCS:          $Header: /usr/local/lib/cvs/EnhanceMail/Info.m,v 1.1.1.4 1995/11/05 18:34:32 cedman Exp $
  6. * Description:  
  7. * Author:       Carl Edman
  8. * Created:      Fri Oct 13 11:48:05 1995
  9. * Modified:     Sat Nov  4 23:32:04 1995 (Carl Edman) cedman@capitalist.princeton.edu
  10. * Language:     C
  11. * Package:      N/A
  12. * Status:       Experimental (Do Not Distribute)
  13. *
  14. * (C) Copyright 1995, but otherwise this file is perfect freeware.
  15. *
  16. *******************************************************************************
  17. */
  18.  
  19. #import "EnhanceMail.h"
  20. #import "Info.h"
  21.  
  22. static id mod=nil;
  23.  
  24. @implementation EnhanceInfo
  25. + finishLoading:(struct mach_header *)header
  26.    {
  27.    [self poseAs:[self superclass]];
  28.    return self;
  29.    }
  30.  
  31. - enhance
  32.    {
  33.    const char *old;
  34.    char *new;
  35.    NXRect or,nr;
  36.    
  37.    old=[releaseField stringValue];
  38.    new=strcpy(alloca(strlen(old)+2),old);
  39.    strcat(new,"e");
  40.    [releaseField setStringValue:new];
  41.    [releaseField sizeToFit];
  42.  
  43.    old=[versionField stringValue];
  44.    [versionField getFrame:&or];
  45.    new=strcpy(alloca(strlen(old)+100),old);
  46.    strcat(new," (e");
  47.    strcat(new,EnhanceVersion);
  48.    strcat(new,")");
  49.    [versionField setStringValue:new];
  50.    [versionField sizeToFit];
  51.    [versionField getFrame:&nr];
  52.    [versionField moveBy:(or.origin.x+or.size.width)-(nr.origin.x+nr.size.width):0];
  53.    
  54.    return self;
  55.    }
  56.  
  57. + new
  58.    {
  59.    id ret=[super new];
  60.    if (mod!=ret) mod=[ret enhance];
  61.    return ret;
  62.    }
  63. @end
  64.